<?php


class Balance_log_model extends CI_Model
{
	public  function  __construct(){
		parent::__construct();
		$this->load->database();
	}
	public  function add($data){
		return $this->db->insert("balance_log",$data);
	}
	public function getAll($id){
		$this->db->where('user_id',$id);
		$this->db->order_by("create_time", "desc");
		$this->db->select('*');
		$query= $this->db->get('balance_log');
		return $query->result_array();
	}
}
